import { defineStore } from 'pinia'

const menuStore = defineStore('menuDataStore', {
    state: () => {
        return {
            // 侧边栏菜单数据
            popupBoxDataList: [
                {
                    id: '1',
                    title: '天气情况',
                    icon: 'weather',
                    path: '/menuItem/weather',
                },
                {
                    id: '2',
                    title: '星座运势',
                    icon: 'starSign',
                    path: '/menuItem/starFortune',
                },
                {
                    id: '3',
                    title: '游戏大厅',
                    icon: 'game',
                    path: '/weiGame'
                },
                // {
                //     id: '4',
                //     title: '打赏',
                //     icon: 'redPacket',
                //     path: '',
                // },
                {
                    id: '5',
                    title: '关于',
                    icon: 'info',
                    path: '/me/webInfo'
                },
            ],
            // 工具列表数据
            menuDataList: [
                {
                    id: '1',
                    title: '互动',
                    icon: 'interaction',
                    text: '点击去体验更多交互内容',
                    path: '/menuItem',
                    list: [
                        {
                            id: '2-1',
                            title: '拨打电话',
                            icon: 'call',
                            text: '点击尝试拨打电话',
                            path: '/menuItem/call'
                        },
                        {
                            id: '2-2',
                            title: '今日油价',
                            icon: 'gasoline',
                            text: '点击查询今日油价详情',
                            path: '/menuItem/gasolinePrice'
                        },
                        {
                            id: '2-3',
                            title: '星座运势',
                            icon: 'starSign',
                            text: '点击查看今日星座运势',
                            path: '/menuItem/starFortune'
                        },
                        {
                            id: '2-4',
                            title: 'deepseek',
                            icon: 'deepseek',
                            text: '点击查看deepseek-r1模型演示',
                            path: '/demo/deepseek'
                        },
                        {
                            id: '2-5',
                            title: 'wei音乐',
                            icon: 'weiMusic',
                            text: '点击进入wei音乐播放器',
                            path: '/weiMusic'
                        },
                        {
                            id: '2-6',
                            title: '游戏大厅',
                            icon: 'game',
                            text: '点击进入游戏大厅',
                            path: '/weiGame'
                        },
                    ]
                },
                {
                    id: '2',
                    title: '小工具',
                    icon: 'tools',
                    text: '点击去使用更多实用工具',
                    path: '/menuItem',
                    list: [
                    {
                            id: '3-1',
                            title: '秒表',
                            icon: 'time',
                            text: '点击使用计时器工具',
                            path: '/menuItem/timePiece'
                        },
                        {
                            id: '3-2',
                            title: '图片压缩',
                            icon: 'img',
                            text: '点击使用图片压缩工具',
                            path: '/menuItem/compressImg'
                        },
                        {
                            id: '3-3',
                            title: '生成二维码',
                            icon: 'qrcode',
                            text: '点击使用生成二维码工具',
                            path: '/menuItem/qrcode'
                        },
                        {
                            id: '3-4',
                            title: 'OCR识别',
                            icon: 'ocr',
                            text: '点击使用OCR识别工具',
                            path: '/menuItem/ocr'
                        },
                        {
                            id: '3-5',
                            title: '天气情况',
                            icon: 'weather',
                            text: '点击查询近日天气情况',
                            path: '/menuItem/weather'
                        },
                        {
                            id: '3-6',
                            title: '签名板',
                            icon: 'signature',
                            text: '点击使用签名板工具',
                            path: '/menuItem/write'
                        },
                        {
                            id: '3-7',
                            title: '小地图',
                            icon: 'map',
                            text: '点击查看并使用小地图',
                            path: '/menuItem/amap'
                        },
                        {
                            id: '3-8',
                            title: '汇率转换',
                            icon: 'exchange',
                            text: '点击使用汇率转换工具',
                            path: '/menuItem/exchange'
                        },
                        {
                            id: '3-9',
                            title: '归属地查询',
                            icon: 'homePlace',
                            text: '点击使用归属地查询工具',
                            path: '/menuItem/homePlace'
                        }
                    ]
                },
                {
                    id: '3',
                    title: '收藏夹',
                    icon: 'collect',
                    text: '点击查看收藏夹内容',
                    path: '/collect'
                },
                {
                    id: '4',
                    title: 'demo',
                    icon: 'store',
                    text: '探索更多可能',
                    path: '/demo'
                },
                {
                    id: '99',
                    title: '敬请期待',
                    icon: 'more',
                    text: '更多内容开发中...',
                    path: ''
                },
            ],
            menuItemDataList: [], // 工具列表中当前选中的项
        }
    },
    actions: {
        handlerSetMenuItemDataList(val: any) { // 设置菜单列表页面列表
            this.menuItemDataList = []
            this.menuItemDataList = val
        }
    }
})

export default menuStore